<?php
$serv = new swoole_server("0.0.0.0", 9502, SWOOLE_PROCESS, SWOOLE_SOCK_UDP);
// 监听数据接收的事件
$serv->on("packet", function($serv, $data, $fd) {
    $serv->sendto($fd['address'], $fd['port'], "{$data}?");
    var_dump($fd);
});
$serv->start();